package com.rui.study.micro.userself.controller;

import com.rui.study.commons.model.Result;
import com.rui.study.micro.userself.model.RegisterAccountDTO;
import com.rui.study.micro.userself.model.RegisterAccountGroup;
import com.rui.study.micro.userself.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @program: study
 * @description:
 * @author: Yaowr
 * @create: 2019-02-19 11:58
 **/
@RestController
@RefreshScope
public class UserController {

    @Autowired
    private AccountService accountService;

    /**
     * 1--查询账号
     * @return
     */
    @GetMapping("/v1/account/{identifier}")
    public Result registerAccount(@PathVariable("identifier") String identifier) {
        return accountService.queryAccount(identifier);
    }
}
